import { myaxios } from "../myaxios";

export const meApi = {
  /**
   *登录
   * @param {object} params {u_phone:string,u_pwd:string}
   * @returns
   */
  userLogin(params) {
    let url = "/user/login";
    return myaxios.post(url, params);
  },

  /**
   *注册
   * @param {object} params {u_phone:string,u_pwd:string}
   * @returns
   */
  usersignin(params) {
    let url = "/user/register";
    return myaxios.post(url, params);
  },
/**
 * 修改用户
 */
  updateUser(params){
    let url='/me/update_myinfo'
    return myaxios.put(url,params)
  },
  /**
 * 修改用户头像
 */
  updateUserHead(params){
    let url='/me/update_avatar'
    return myaxios.put(url,params)
  },
    /**
 * 修改密码
 */
  updateUserpwd(params){
    let url='/me/update_pwd'
    return myaxios.put(url,params)
  },
};
